home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIProfileInternal.idl < prev    next >
Text File  |  2006-05-08  |  6KB  |  155 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  26.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. #include "nsIProfile.idl"
  39.  
  40. interface nsICmdLineService;
  41. interface nsIFile;
  42. interface nsILocalFile;
  43. interface nsISupportsArray;
  44.  
  45. %{C++
  46. #define NS_ERROR_PROFILE_REQUIRES_INTERACTION NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_PROFILE, 1)
  47. %}
  48.  
  49. [scriptable, uuid(2f977d42-5485-11d4-87e2-0010a4e75ef2)]
  50. interface nsIProfileInternal : nsIProfile {
  51.     
  52.     /**
  53.      * Starts up the profile manager
  54.      *
  55.      * @param cmdLine       Arguments passed from command line - can be null
  56.      * @param canInteract   Whether dialogs can be shown during startup
  57.      *                      If false and dialogs would need to be shown, returns NS_ERROR_PROFILE_REQUIRES_INTERRACTION
  58.      */
  59.     [noscript] void startupWithArgs(in nsICmdLineService cmdLine, in boolean canInteract);
  60.  
  61.     /**
  62.      * Returns TRUE if in the midst of startupWithArgs
  63.      */
  64.     [noscript] readonly attribute boolean isStartingUp;
  65.  
  66.     long get4xProfileCount();
  67.  
  68.    /**
  69.     * The following values are used with getProfileListX
  70.     *
  71.     * LIST_ONLY_NEW     - the list will contain only migrated profiles
  72.     * LIST_ONLY_OLD     - the list will contain only un-migrated profiles
  73.     * LIST_ALL          - the list will contain all profiles
  74.     * LIST_FOR_IMPORT   - the list is generated from 4.x registry and contains
  75.     *                     all the 4.x profiles
  76.     *                     do not use this except from the import module
  77.     * 
  78.     */
  79.     
  80.     const unsigned long LIST_ONLY_NEW  = 1;
  81.     const unsigned long LIST_ONLY_OLD  = 2;
  82.     const unsigned long LIST_ALL       = 3;
  83.     const unsigned long LIST_FOR_IMPORT= 4;
  84.     
  85.     void getProfileListX(in unsigned long which, out unsigned long length, [retval, array, size_is(length)] out wstring profileNames);
  86.    
  87.     void migrateProfileInfo();
  88.     void migrateAllProfiles();
  89.     void migrateProfile(in wstring profileName);
  90.     void remigrateProfile(in wstring profileName);
  91.     void forgetCurrentProfile();
  92.     void createDefaultProfile();
  93.  
  94.     /**
  95.      * Returns the actual profile directory
  96.      */
  97.     nsIFile getProfileDir(in wstring profileName);
  98.     
  99.     /**
  100.      * Returns the path to a profile which can be shown to the user.
  101.      * If the actual profile directory is salted, returns the unsalted parent.
  102.      * This is the directory which will be deleted by deleteProfile(name, true).
  103.      */
  104.     wstring getProfilePath(in wstring profileName);
  105.     
  106.     /**
  107.      * Returns a profile directory of the importType. The path will point to 
  108.      * the 4.x profile directory. Should be used only from the import module.
  109.      */
  110.     nsILocalFile getOriginalProfileDir(in wstring profileName);
  111.  
  112.     /**
  113.      * Returns the date on which a profile was last used.
  114.      * value is in milliseconds since midnight Jan 1, 1970 GMT (same as nsIFile)
  115.      */
  116.     PRInt64 getProfileLastModTime(in wstring profileName);
  117.     
  118.     attribute boolean automigrate;
  119.     readonly attribute nsIFile defaultProfileParentDir;
  120.     readonly attribute wstring firstProfile;
  121.     
  122.     /**
  123.      * Affects startup behavior when there are multiple profiles.
  124.      *  If FALSE, the profile selection dialog will be shown.
  125.      *  If TRUE, the last used profile will be chosen automatically.
  126.      */ 
  127.     attribute boolean startWithLastUsedProfile;
  128.  
  129.     [noscript] void updateRegistry(in nsIFile regName);
  130.     [noscript] void getRegStrings(in wstring profileName,
  131.                        out wstring regString,
  132.                        out wstring regName,
  133.                        out wstring regEmail,
  134.                        out wstring regOption);
  135.     [noscript] void setRegStrings(in wstring profileName, 
  136.                        in wstring regString,
  137.                        in wstring regName,
  138.                        in wstring regEmail,
  139.                        in wstring regOption);
  140.     [noscript] string isRegStringSet(in wstring profileName);
  141.     
  142.     void createNewProfileWithLocales(in wstring profileName,
  143.                           in wstring nativeProfileDir,
  144.                           in wstring UILocale,
  145.                           in wstring contentLocale,
  146.                           in boolean useExistingDir);
  147.    /**
  148.     * The remaining methods are deprecated. DO NOT USE THEM.
  149.     */
  150.     
  151.     boolean isCurrentProfileAvailable();
  152.     [noscript] void getCurrentProfileDir(out nsIFile profileDir);
  153.  
  154. };
  155.